document.writeln('<div class="logo-wrapper">');
document.write('<img src="./src/img/logo.png" alt="浙江省安全生产数据中心服务应用平台">');
document.write('<div class="nav" id="nav">')
document.write('<ul class="clearfix">')
// document.write(' <li> <a class="active" href="./index.html?navId=0">安全态势 </a>  </li>')
// document.write(' <li> <a  href="./whhy.html?navId=1"> 危化行业</a> </li>')
document.write(' </ul>')
document.write('</div>')
document.write('<a href="javascript:;" class="login-wrapper"><span class="login" >进入系统</span></a>')
document.write('</div>')
function GetRequest() {
    var url = location.search; //获取url中"?"符后的字串
    var theRequest = new Object();
    if (url.indexOf("?") != -1) {
        var str = url.substr(1);
        strs = str.split("&");
        for (var i = 0; i < strs.length; i++) {
            theRequest[strs[i].split("=")[0]] = (strs[i].split("=")[1]);
        }
    }
    return theRequest;
}

var navId = parseInt(GetRequest().navId);
if (!navId) {} else {
    $('#nav a').removeClass('active');
    $('#nav a').eq(navId).addClass('active')
}

function getRootPath() {
    //pathName:--->   mbuy/user/login.action
    var pathName = window.location.pathname.substring(1);
    //webName:--->mbuy
    var webName = pathName == ''
        ? ''
        : pathName.substring(0, pathName.indexOf('/'));
    //return:--->http://localhost:9999/mbuy/
    return window.location.protocol + '//' + window.location.host + '/' + webName + '/';
}
